package com.sskj.gocoin.p.activity;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.gocoin.m.HttpConfig;
import com.sskj.gocoin.m.bean.HttpData;
import com.sskj.gocoin.m.bean.Notice;
import com.sskj.gocoin.m.http.JsonCallBack;
import com.sskj.gocoin.p.base.BasePresenter;
import com.sskj.gocoin.utils.LanguageUtil;
import com.sskj.gocoin.v.activity.WebViewActivity;

/**
 * Created by Administrator on 2018/4/16.
 */

public class NoticeDetailPresenter extends BasePresenter<WebViewActivity> {
    public void getAgree(String id) {
        OkGo.<HttpData<String>>get(HttpConfig.BASE_URL + HttpConfig.AGREE)
                .params("type", LanguageUtil.isChinese() ? id : (id + "1"))
                .execute(new JsonCallBack<HttpData<String>>(this) {
                    @Override
                    public void _onSuccess(Response<HttpData<String>> response) {
                        mView.loadData(response.body().getData());
                    }
                });

    }


}
